import request from '@/utils/request'

// 章节详情
export function getChapterDetail(data: { bookId: string }) {
  return request({
    url: '/books/detail',
    method: 'post',
    data
  })
}

// 章节列表（分页）
export function getChapterList(data: {
  bookId: string
  page?: number
  pageSize?: number
  orderBy?: number
}) {
  return request({
    url: '/books/chapterList',
    method: 'post',
    data
  })
}

// 获取章节列表（所有）
export function getChapterAllList(data: {
  bookId: string
  index: number
  type: string
  pageSize: number
}) {
  return request({
    url: '/books/chapterAllList',
    method: 'post',
    data
  })
}
